from typing import Optional
from pydantic import BaseModel

class CarrierBase(BaseModel):
    Code: str
    FullName: str
    BriefName: str
    TicketNoCode: Optional[str] = None
    ServiceTel: Optional[str] = None
    Memo: Optional[str] = None

    class Config:
        from_attributes = True

class CarrierCreate(CarrierBase):
    pass

class CarrierUpdate(CarrierBase):
    Code: Optional[str] = None
    FullName: Optional[str] = None
    BriefName: Optional[str] = None

class Carrier(CarrierBase):
    ID: int

    class Config:
        from_attributes = True 